package com.xuecheng.controller;

import com.xuecheng.pojo.Student;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * - @author by 姜暄煊
 * - @Date
 * - @Description
 */
@Api(tags = "hello api服务测试",description = "对 hello api服务提供接口")
public interface HelloControllerimp {
    @ApiOperation("测试hello方法")
    String hello();

    @ApiOperation("queryString方法")
    @ApiImplicitParam(name = "num" , value = "学成的编号",required = true
                        ,dataType = "String"
                        ,paramType = "query"
    )
    Student modifyStudentNum(@RequestParam("num") String num);

    @ApiOperation("综合参数方式的测试方法")
    @ApiImplicitParams(
            {
                    @ApiImplicitParam(name = "id" ,value = "学成的编号" ,required = true
                    ,dataType = "String",paramType = "path"
                    ),
                    @ApiImplicitParam(name = "name",value = "学成的名称",required = true
                    ,dataType = "String",paramType = "query"
                    )
            }
    )
    Student mofidyStudentBynNum(@PathVariable("id") String id, @RequestParam("name") String name, @RequestBody Student student);
}
